// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import BootstrapVue from 'bootstrap-vue'
import VueI18n from 'vue-i18n'
import axios from './assets/js/http'
import store from './store';

import {
  JSEncrypt
} from '../static/jsencrypt.min'
import cookie from './assets/js/cookie'
import swal from 'sweetalert'
import $ from './../static/lib/jquery'
import VueAlertLoading from 'vue-alert-loading'

import _ from 'lodash'


import echarts from 'echarts/lib/echarts'
import router from './router'
import CN from '../static/lang/zh_CN'


import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

// kline


Vue.use(BootstrapVue);
Vue.use(VueI18n);
Vue.use(VueAlertLoading)


/*---------使用语言包-----------*/
const i18n = new VueI18n({
  locale: 'CN', // 语言标识
  messages: {
    'CN': CN, // 中文语言包
  },
})

Vue.config.productionTip = false
const qs = require('qs');
Vue.prototype.$qs = qs;
Vue.prototype._ = _;
Vue.prototype.$JSEncrypt = new JSEncrypt();
Vue.prototype.service = "/nb-web/api";
Vue.prototype.$http = axios;
Vue.prototype.$cookie = cookie;
Vue.prototype.$swal = swal;
Vue.prototype.$echarts = echarts;
Vue.prototype.$= $;

new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: {
    App
  },
  i18n,
  store
})
